package main

import (
	"fmt"
	"strconv"
)

func main() {
	fmt.Println("Are you ok!")
	//var n1 int = 18
	//var s1 string = strconv.FormatInt(int64(n1), 10)
	//fmt.Printf("s1对应的类型是：%T   ---   s1 = %q \n", s1, s1)
	//
	//var n2 float64 = 3.1415926
	//var s2 string = strconv.FormatFloat(n2, 'f', -9, 64)
	//fmt.Printf("s2对应的类型是：%T   ---   s2 = %q \n", s2, s2)
	//
	//var n3 bool = true
	//var s3 string = strconv.FormatBool(n3)
	//fmt.Printf("s3对应的类型是：%T   ---   s3 = %q \n", s3, s3)

	fmt.Println("string 转基本类型 ")
	var s1 string = "true"
	var b bool
	b, _ = strconv.ParseBool(s1)
	fmt.Println(b)
	fmt.Printf("b的类型是：%T, ---  b= %v", b, b)

	var s2 string = "19"
	var num1 int64
	num1, _ = strconv.ParseInt(s2, 10, 64)
	fmt.Printf("num1的类型是：%T, ---  num1= %v", num1, num1)

}
